<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <link rel="shortcut icon" href="../../src/images/bitbug_favicon.ico" type="image/x-icon">
  <meta name="keywords" content="your keywords">
  <meta name="description" content="your description">
  <meta name="author" content="author,email address">
  <meta name="robots" content="index,follow">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="renderer" content="ie-stand">
  <title>仁和区党群服务一号通暨群众意见受理中心</title>
  <link rel="stylesheet" href="../../src/css/base.css">
  <link rel="stylesheet" href="../../src/css/common.css">
  <link rel="stylesheet" href="../../src/css/tpl.css">
  <link rel="stylesheet" href="../../src/css/user_center.css">
    <script src="../../src/js/libs/es5-shim.min.js"></script>   <script src="../../src/js/libs/es5-sham.min.js"></script>    <script src="../../src/js/libs/json3.min.js"></script> </head>

<body>
  <div class="page">

    <div class="header-top">
      <div class="container clearfix">
        <div class="fl welcome">
          <span>欢迎进入这里仁和，倾听民声</span>
          <span>今天是：2017年07月31日 星期一</span>
        </div>
        <div class="fr login">
          <a href="">登录</a> | <a href="">注册</a>
        </div>
      </div>
    </div>
    <!--顶部banner  -->
    <div class="header-banner">
      <div class="header-banner-roll">
      </div>
    </div>
    <!--导航条  -->
    <div class="navigation">
      <div class="container">
        <ul class="clearfix">
          <li><a href="../Home">首页</a></li>
          <li><a href="../Home/About.html">关于我们</a></li>
          <li><a href="../News">最新资讯</a></li>
          <li><a href="../Consult/consult.html">办事咨询</a></li>
          <li><a href="../Feedback/Goldidea.html">在线民声</a></li>
          <li class="active"><a href="../Complain">投诉处理</a></li>
          <li><a href="../Personal/leaveMessage.html">个人中心</a></li>
        </ul>
      </div>
    </div>
    <div class="menu-bar">
      <div class="container">
        <span>
              <span class="crumb-name">当前你的位置：</span>>
        <span>
                   <a href="../Home/Index.html">首页</a>>
            </span>
        <span>投诉处理</span>
      </div>
    </div>

    <div class="container">
    </div>
    <!--正文-->
    <div class="mid_container clearfix">

      <div class="left_guide">
        <h1 class="left_guide_top_size">
          投诉处理
        </h1>
        <div class="left_guide_decorate">
        </div>
        <div class="left_about_us">
          COMPLAIN HANDING
        </div>
        <div class="left_white_about active">
          <a href="Index.html"><span class="left_cn_about_us">投诉处理</span></a>
        </div>
      </div>
      <div class="mid_guide">
        <div class="mid_guide_content">
          <div class="audit_content">
            <div id="info_html"></div>
            <div id="feedback_html"></div>
            <div class="audit_title title_5">取消投诉</div>
            <div class="audit_info_row clearfix">
              <form action="" method="get" id="cancel_form" style="padding-left: 40px;">
                <input class="radio" id="cancel1" name="cancel" type="radio" value="1"><label for="cancel1">&nbsp;未完全了解情况 </label><br>
                <input class="radio" id="cancel2" name="cancel" type="radio" value="2"><label for="cancel2">&nbsp;事件已妥善处理</label><br>
                <input class="radio" id="cancel3" name="cancel" type="radio" value="3"><label for="cancel3">&nbsp;其他</label>
              </form>
            </div>
          </div>
          <div class="btn_bar">
            <input type="button" value="提交" class="butt red" onclick="Cancel()">
            <a href="javascript:;" onclick="history.go(-1)"><input type="button" value="返回" class="butt white"></a>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div id="footer"></div>
  <!-- 详情 -->
  <script type="text/html" id="info_tpl">
    <div class="audit_title title_1">{{title}}</div>
    <div class="audit_info">
      <div class="audit_info_row clearfix">
        <div class="fl left">事发时间：</div>
        <div class="right">{{createtime}}</div>
      </div>
      <div class="audit_info_row clearfix">
        <div class="fl left">事发地址：</div>
        <div class="right">{{address}}</div>
      </div>
      <div class="audit_info_row clearfix">
        <div class="fl left">投诉时间：</div>
        <div class="right">{{operationtime}}</div>
      </div>
      <div class="audit_info_row clearfix">
        <div class="fl left">投诉编号：</div>
        <div class="right">{{id}}</div>
      </div>
      <div class="audit_info_row clearfix">
        <div class="fl left">投诉内容：</div>
        <div class="right unlimited"> {{content}}</div>
      </div>
      <div class="audit_info_row last_row clearfix">
        <div class="fl left">相关图片：</div>
        <div class="right unlimited">
          {{each picurllist val idx}}
          <div class="show" style="background: url({{val.smallpic}}) center;background-size: cover"></div>
          {{/each}}
        </div>
      </div>
    </div>
  </script>
  <!-- 反馈 -->
  <script type="text/html" id="feedback_tpl">


  </script>
  <script src="../../src/js/libs/jquery.1.12.4.js"></script>
  <script src="../../src/js/libs/template-web.js"></script>
  <script src="../../src/js/libs/layer/layer.js"></script>
  <script src="../../src/js/base/common.js"></script>
  <script>
    var userid = document.cookie.split(";")[1].split("=")[1];
    var complainid = document.URL.split('?')[1].split('&')[0]

    GetList(complainid)

    function GetList(id) {
      $.ajax({
        async: false,
        type: "GET",
        url: "http://221.10.2.222:5680/api/ow/Complain/Model/" + id,
        dataType: "json",
        success: function (res) {
          var info = template('info_tpl', res)
          $('#info_html').html(info)
        },
      })
    }

    function Cancel() {
      if ($("input[type='radio']:checked").val() == "") {
        layer.msg("请选择取消原因！")
        return;
      }
      var news = {
        "userid": userid,
        "id": complainid,
        "reason": $('input[name="cancel"]:checked').val(),
      }
      $.ajax({
        type: "POST",
        url: "http://221.10.2.222:5680/api/ow/Complain/Cancel",
        dataType: "json",
        data: news,
        success: function (data) {
          if (data.result > 0) {
            layer.msg("取消成功！")
            window.location.href = "../Complain/";
          } else {
            layer.msg("取消失败！")
          }
        }
      });

    }
  </script>
</body>

</html>